const { Sequelize } = require('sequelize')

const sequelize = new Sequelize('wishtest','root','root',{
  host:'localhost',
  dialect:'mysql',
  logging:console.log, // 默认值，显示日志函数调用的第一个参数
})
try{ 
  sequelize.authenticate();
  console.log('数据库连接成功')
} catch (error) {
  console.log('数据库连接失败',error)
}

module.exports = sequelize;